//设置相机属性参数，进行控制

#ifndef CAMERA_H
#define CAMERA_H

#include <QObject>

//根据协议设置的抽象接口参数类型，如更换相机需要遵循协议

class Camera : public QObject
{
    Q_OBJECT
public:
    explicit Camera(QObject* parent = nullptr) : QObject(parent) {}

    virtual ~Camera() = default;

    //相机初始化
    virtual int cameraInit() = 0;

    //复位相机
    virtual int cameraReset() = 0;

    //触发拍照
    virtual int trigger() = 0;

    //设置触发源：内触发/外触发
    virtual int setTriggerSource(unsigned char source) = 0;
    virtual unsigned char getTriggerSource() const = 0;

    //设置曝光时间
    virtual int setExposureTime(unsigned short time) = 0;
    virtual unsigned short getExposureTime() const = 0;

    //设置模拟增益
    virtual int setAnologGain(unsigned char gain) = 0;
    virtual unsigned char getAnologGain() const = 0;

    //获取sensor温度
    virtual short getSensorTemperature() const = 0;
    virtual short getFpgaBoardTemperature() const = 0;

    //设置图像模式：真实图像/测试图像
    virtual int setpictureMode(unsigned char mode) = 0;
    virtual unsigned char getPictureMode() const = 0;

    //设置帧率
    virtual int setFrameRate(unsigned short rate) = 0;
    virtual unsigned short getFrameRate() const = 0;

signals:
    //发送图像捕获信号
    void sigImageCaptured(unsigned char *image_pointer);

};

#endif // CAMERA_H
